public class HiddenFieldPageStatePersister : PageStatePersister
{
    // Methods
    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
    public HiddenFieldPageStatePersister(Page page) : base(page)
    {
    }

    public override void Load()
    {
        if (base.Page.RequestValueCollection != null)
        {
            string requestViewStateString = null;
            try
            {
                requestViewStateString = base.Page.RequestViewStateString;
                if (!string.IsNullOrEmpty(requestViewStateString) || !string.IsNullOrEmpty(base.Page.ViewStateUserKey))
                {
                    Pair pair = (Pair) Util.DeserializeWithAssert(base.StateFormatter2, requestViewStateString, Purpose.WebForms_HiddenFieldPageStatePersister_ClientState);
                    base.ViewState = pair.First;
                    base.ControlState = pair.Second;
                }
            }
            catch (Exception exception)
            {
                if (exception.InnerException is ViewStateException)
                {
                    throw;
                }
                ViewStateException.ThrowViewStateError(exception, requestViewStateString);
            }
        }
    }

    public override void Save()
    {
        if ((base.ViewState != null) || (base.ControlState != null))
        {
            base.Page.ClientState = Util.SerializeWithAssert(base.StateFormatter2, new Pair(base.ViewState, base.ControlState), Purpose.WebForms_HiddenFieldPageStatePersister_ClientState);
        }
    }
} 